package com.example.midushop.service.product.impl;

import com.example.midushop.entity.product.spu.ProductSPU;
import com.example.midushop.mapper.product.spu.ProductSPUMapper;
import com.example.midushop.service.product.ProductSPUService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * 商品SPU信息服务接口实现类
 * */
@Service
public class ProductSPUServiceImpl implements ProductSPUService {
    @Autowired
    ProductSPUMapper productSPUMapper;
    @Override
    public int addProductSPU(long categorythree_id, String name, String code, String cover, String intro, long brand_id, String after_sales_service, int is_marketable, int is_delete, int status, Date create_time, Date update_time) {
        return productSPUMapper.addProductSPU(categorythree_id,name,code,cover,intro,brand_id,after_sales_service,is_marketable,is_delete,status,create_time,update_time);
    }

    @Override
    public List<ProductSPU> findProductAll(long spu_id, long categorythree_id, String name,String code, long brand_id) {
        return productSPUMapper.findProductAll(spu_id,categorythree_id,name,code,brand_id);
    }

    @Override
    public List<ProductSPU> findProductAllInfo(long spu_id, long categorythree_id, String name, String code, long brand_id) {
        return productSPUMapper.findProductAllInfo(spu_id,categorythree_id,name,code,brand_id);
    }
}
